package com.example.wechatdaka.controller;


import com.example.wechatdaka.entity.Log;
import com.example.wechatdaka.service.LogService;
import com.example.wechatdaka.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lx
 * @since 2020-11-05
 */
@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;
    @RequestMapping("/index")
    @ResponseBody
    public Result queryAllLogs(){
        List<Log> logs = logService.list(null);
        return new Result(Result.SUCCESS,logs,"success");
    }

}

